Field of the Invention
The invention relates to a method for generating control parameters from a response signal of a controlled system with a computer. It relates, further, to a system for adaptive setting of a PID controller with the aid of a neural network.
PID controllers are known from Otto Fxc3x6llinger, xe2x80x9cRegelungstechnikxe2x80x9d [Control Technology], 5th Ed., Hxc3xcttig Verlag, Heidelberg 1995, pages 204-206. They are frequently used in process engineering. For this purpose, the controllers must be calculated in order to be able to control the assigned controlled system. In production engineering, there are, as a rule, no models of the controlled system available for calculating controllers. In order to set a PID controller, an identification is frequently carried out which can be performed, for example, offline on the basis of a measured step response. In this process, the appropriate model with the associated model parameters is sought from a given set of models of the controlled systems. A suitable PID controller can be calculated on the basis of this model.
It would be expedient if the identification step and the controller calculation could be combined to form a single step. A well defined mapping of the step response onto the desired controller parameters would result from this. In order to minimize the outlay arising in this case, it is obvious to approximate the same by means of a neural network. If such a trained neural network is available, suitable controller parameters can be found immediately by firstly recording the step response of the controlled system of a given technical installation and then making it available to the neural network as input. The outputs of the neural network are the controller parameters being sought.
In order to train the neural network, it is possible to prescribe controlled systems for which the associated controller parameters are directly known. It is possible to use, for example, an expert system for setting PID controllers or a library of appropriate controller parameters, which may be determined in some other way, as a basis for training the neural network. This device for training can be termed a teacher, for example. The task of the neural network is compared with that of the teacher and the network weightings are corrected so as to reduce the output error of the neural network. This is performed for a multiplicity of different prescribed system models until the error is sufficiently small for all the examples. Neural networks which satisfy these requirements are known, for example, from J. Hertz, A. Krogh, and R. Palmer, xe2x80x9cIntroduction to the Theory of Neural Computationxe2x80x9d, Addison-Wesley Pub. Co., 1991, pages 115-147. A further solution is known from international publication WO 93/12476. There, the controller parameters are determined directly from the time signals with the aid of the neural network. As a rule such networks must be very large and are difficult to train, and the emitted controller parameters are not reliable.
European patent disclosure EP 0 520 233 A2 discloses a device for indicating the parameters of a transmission system, in which a simulation module is used to compare estimated output signals with measured output signals. Deviations are minimized for optimum parameters.
Instead of the step response of the controlled system, the following text refers to the response signal of the controlled system.
It is accordingly an object of the invention to provide a method for generating control parameters from a response signal of a controlled system and a system for an adaptive setting of a PID controller with the aid of a neural network which overcomes the above-mentioned disadvantages of the heretofore-known methods and systems of this general type and according to which, characteristics of a Bode diagram are generated from a noisy response signal, wherein the characteristics are largely uninfluenced by the noise. A further object is to specify a system for adaptively setting a PID controller with the aid of a neural network, in which the controller parameters emitted by the neural network ensure an acceptable controller setting even in the presence of a noisy response signal.
With the foregoing and other objects in view there is provided, in accordance with the invention, a method for generating control parameters from a response signal of a controlled system with a computer, the method which comprises:
sampling an input signal and a response signal for generating a sampled input signal and a sampled response signal;
smoothing and optionally differentiating the sampled input signal and the sampled response signal with the aid of a time-variant filter for generating a smoothed input signal and a smoothed response signal;
generating in each case frequency characteristics from the smoothed input signal and the smoothed response signal;
forming a difference between the frequency characteristics in a Bode diagram; and
determining control parameters with the aid of the difference.
With the foregoing and other objects in view there is also provided, in accordance with the invention, a method for generating control parameters from a response signal of a controlled system with a computer, the method which comprises:
sampling an input signal and a response signal for generating a sampled input signal and a sampled response signal;
deconvoluting the response signal with respect to the input signal for generating a smoothed impulse response from the sampled response signal;
forming frequency characteristics in a Bode diagram from the impulse response; and
determining control parameters with the aid of the frequency characteristics.
With the foregoing and other objects in view there is furthermore provided, in accordance with the invention, a method for generating control parameters from a response signal of a controlled system with a computer, the method which comprises:
sampling a response signal for generating a sampled response signal;
smoothing or smoothing and differentiating the sampled response signal with the aid of a time-variant filter for generating a smoothed response signal;
generating frequency characteristics in a Bode diagram from the smoothed response signal;
determining control parameters with the aid of the frequency characteristics.
In preferred embodiments of the methods according to the invention any of the steps of deconvoluting, smoothing or smoothing and differentiating of either the input signal or the response signal or the step of generating the impulse response may be performed in accordance with the formula:
{tilde over (x)}=Vx
v=Vy
where y is a vector consisting of samples of the response signal, V is a matrix for at least one of deconvoluting, smoothing or smoothing and differentiating, v is a vector of a smoothed impulse response, x is a vector of the input signal, and {tilde over (x)} is a vector of the smoothed input signal.
In accordance with a further feature of the invention, the matrices V for smoothing, for smoothing and differentiating or for deconvoluting are obtained from an energy function having a term specifying a deviation of an approximation from a measured response signal, and having a term specifying a roughness of a reconstructed impulse response.
In accordance with a another feature of the invention, a smoothing deconvolution matrix V is obtained by minimizing the following energy function:
xcex5(b)=k((yxe2x88x92XA3b)TD0(yxe2x88x92XA3b)+vT
D1v+aTD2a+rTD3r+bTD4b)
where k denotes a constant, e.g. k=0.5, X a convolution integration matrix which is calculated as a function of the input signal x(t), A an integration matrix, r=Ab, a=Ar, v=A a, and D0, D1D2, . . . D4 arbitrarily selectable diagonal matrices, and the solution of a minimization is
v=Vy
V=A3(A3TXTD0XA3+A3TD1A3+A2TD2A2+
ATD3A+D4)xe2x88x921A3TXTD0.
In accordance with a further feature of the invention, the matrix V for smoothing or smoothing and differentiating is:
V+A3(A4TD0A4+A3TD1A3+A2TD2A2+ATD3A+D4)xe2x88x921A4TD0
where D1 . . . D4 denote arbitrarily selectable diagonal matrices, A an integration matrix, and T a transposition.
In accordance with a further feature of the invention, the matrix for smoothing or smoothing and differentiating is obtained from the energy function
xcex5(a)=k[(yxe2x88x92A2a)T(yxe2x88x92A2a)+aTDa]
the first term being the deviation of the approximation from the measured response signal, the second term being the roughness of the approximation, with s=Av, v=Aa, and s=A2a, D being a diagonal matrix, A an integration matrix, k being a constant, e.g. k=0.5, y a vector consisting of samples of the response signal, and T indicating a transposition.
In accordance with a further feature of the invention, the matrix for smoothing or the matrix for smoothing and differentiating is obtained from the energy function
xcex5(b)=k[(yxe2x88x92A4b)TD0(yxe2x88x92A4b)+vTD1
v+aTD2a+rTD3r+bTD4b]
where D1 . . . D4 are diagonal matrices, A is an integration matrix, s=Av, v=Aa, a=Ar, r=Ab, k is a constant, y a vector consisting of samples of the response signal, and T indicates a transposition.
In accordance with a further feature of the invention, the Bode diagram is normalized with respect to frequency and preferably normalized to a frequency at which a phase characteristic assumes a value xe2x88x92xcfx86N.
In accordance with a further feature of the invention, characteristics of the Bode diagram are generated in accordance with a method of approximating a step response or an impulse response by a polygon or by rectangular blocks and the transformation into the frequency domain is performed with elementary correspondences.
In accordance with a further feature of the invention, a frequency response is approximated with the aid of the relation:       H    ⁢          (      jω      )        ≅            ∑              v        =        1            q        ⁢          xe2x80x83        ⁢                  h        ⁡                  [                      v            -            1                    ]                    ⁢                        H          v                ⁢                  (          jω          )                      ≅            1                        (                      q            -            1                    )                ⁢        T              ⁢                  ∑                  v          =          1                q            ⁢              xe2x80x83            ⁢                        v          v                ⁢                              H            v                    ⁢                      (            jω            )                              
where H(jxcfx89) denotes a frequency response, and h and T symbolize a height and a width of a rectangular block, respectively.
In accordance with a further feature of the invention, an approximation of the frequency response is obtained from the vector y with:       f    _    ≅            1                        (                      q            -            1                    )                ⁢        T              ⁢                  HV        y            _      
with
H=[h1h2 . . . hm]T,
and             [                        H          ⁢                      (                          jω              1                        )                          ⁢                  H          ⁢                      (                          jω              2                        )                          ⁢                  xe2x80x83                ⁢        …        ⁢                  xe2x80x83                ⁢                  H          ⁢                      (                          jω              m                        )                              ]        ≅                  1                              (                          q              -              1                        )                    ⁢          T                    ⁢                                    v            _                    T                ⁡                  [                                                    h                _                            1                        ⁢                                          h                _                            2                        ⁢                          xe2x80x83                        ⁢            …            ⁢                          xe2x80x83                        ⁢                                          h                _                            m                                ]                      ,
where f denotes an approximation of the frequency response, H a frequency transformation matrix, V a matrix for smoothing, for smoothing and differentiating or for deconvoluting, and y a vector consisting of samples of the response signal.
With the foregoing and other objects in view there is also provided, in accordance with the invention, a system for adaptive setting of a PID controller with the aid of a neural network, comprising:
a sampling device for sampling a response signal, the response signal emitted by a controlled system in response to a supplied input signal;
a transformation device for smoothing and optionally differentiating the input signal and the response signal and transforming the input signal and the response signal into a frequency domain;
a diagram device for forming a difference between frequency characteristics of the input signal and the response signal in a Bode diagram and for generating a Bode diagram of the controlled system; and
a neural network for emitting parameters for setting a PID controller, an absolute value characteristic of the Bode diagram and a phase characteristic of the Bode diagram being supplied to the neural network as input values either directly or after a conversion.
With the foregoing and other objects in view there is furthermore provided, in accordance with the invention, a system for adaptive setting of a PID controller with the aid of a neural network, comprising:
a sampling device for sampling a response signal, the response signal emitted by a controlled system in response to a supplied input signal;
a deconvolution device for calculating a smoothed impulse response from the response signal as a function of the input signal;
a diagram device for obtaining a Bode diagram of the controlled system from the smoothed impulse response;
a neural network for emitting parameters for setting a PID controller, an absolute value characteristic of the Bode diagram and a phase characteristic of the Bode diagram being supplied to the neural network as input values either directly or after a conversion thereof.
With the foregoing and other objects in view there is also provided, in accordance with the invention, a system for adaptive setting of a PID controller with the aid of a neural network, comprising:
a sampling device for sampling a response signal, the response signal emitted by a controlled system in response to a supplied input signal;
a transformation device for smoothing and optionally differentiating the response signal and transforming the response signal into a frequency domain;
a diagram device for generating a Bode diagram from the smoothed response signal;
a neural network for emitting parameters for setting a PID controller, an absolute value characteristic of the Bode diagram and a phase characteristic of the Bode diagram being supplied to the neural network as input values either directly or after a conversion.
In accordance with a further feature of the invention, a normalization device for normalizing the Bode diagram with respect to the frequency is provided.
Preferred embodiments of the systems for the adaptive setting of a PID controller operate by using the methods for generating control parameters in accordance with the invention.
According to the invention, the controller parameters are not determined by the neural network directly from the step response, but the frequency characteristics of the system are calculated in advance from the step response. The neural network is then fed input values which are calculated from the frequency characteristics of the system. As an advantage, it is possible to use much smaller networks which emit good controller parameters with greater reliability. Methods for calculating the frequency characteristics of the system from an emitted step response are known, for example, from H. Unbehauen, xe2x80x9cRegelungstechnikxe2x80x9d [Control Technology], 1989, pages 370-389 and from R. Isermann, xe2x80x9cIdentifikation dynamischer Systeme 1xe2x80x9d [Identification of Dynamic Systems], Springer Verlag, 1989, pages 81-113. However, these become problematic when noise signals are superimposed on the step response. When such a noisy step response is used to calculate the frequency characteristics which drive the neural network, it is still possible that the controller parameters generated by the neural network are unsuitable. The measures described by Unbehauen and Isemann for smoothing the step response either require several measurements or are not sufficient to achieve the desired reliability. For this reason, the invention also describes a novel smoothing method which permits the frequency characteristics of the system to be calculated from a single noisy measurement.
Consequently, the neural network does not receive as input variables features formed directly from the step response, but the step response is preprocessed. This preprocessing comprises smoothing and differentiating the step response, followed by a Fourier transformation, which can be combined to form a matrix multiplication with a complex-value matrix. The data thus obtained are plotted in the form of a Bode diagram. Subsequently, the frequency characteristics found are normalized, that is to say the absolute-value characteristic with respect to the amplitude and the frequency, and the phase characteristic with respect to the frequency. In the Bode diagram, this normalization effects a simple displacement of the frequency characteristics. The normalization quantity is that frequency at which the phase characteristic assumes the value xe2x88x92100xc2x0, and the associated absolute value of the absolute-value characteristic. The neural network must therefore learn only normalized control parameters for normalized systems, which results in a simplification. Characteristic quantities are now formed as input variables for the neural network from the remaining normalized frequency characteristics. The output variables of the network represent the normalized controller parameters of the PID controller. Finally, the desired controller parameters are obtained by denormalization.
Several methods are known for obtaining frequency responses from a step response of a linear controlled system. Reference is made to the methods of the Fast Fourier Transform (FFT) or the Discrete Fourier Transform (DFT). A further practicable method is approximation of the step response by means of a polygon and transformation into the frequency domain by means of elementary correspondences, as is described by H. Unbehauen and R. Isermann for example. The direct application of these methods in the case of a noisy step response is, however, not sufficient as a rule for determining the control parameters. In this case, it is generally recommended to perform a time-consuming excitation of the controlled system by means of multiple steps or impulses or by means of stochastic signals, which is seldom possible in process engineering.
In order to obtain sufficiently indicative frequency characteristics in the Bode diagram for designing a PID controller with the aid of a single, even noisy step response, according to the invention the step response is firstly smoothed, use being made for the purpose of smoothing of the fact that the step response is available over the entire variation for the purpose of determining a point on the smoothed curve. After the smoothing, the step response can be differentiated, the result being an estimate of the system impulse response. The estimated impulse response now represents the basis for determining the frequency characteristics of the controlled system in a fashion analogous to the methods presented by Unbehauen and Isermann. This method still yields good results even given a very noisy step response. The two named operations can be formulated in matrix notation and combined to form a single matrix multiplication with a complex-value matrix.
The method has been described so far with the use of a step response. However, this is not necessary, since the method also operates satisfactorily when an arbitrary response signal of a controlled system is used.
In this case, there are two possibilities for generating the frequency characteristics in the case of a closed control loop. With the first possibility, the input signal and the response signal can be used. With both, the step response is firstly smoothed and then subjected to Fourier transformation, as before. Differentiation can be dispensed with here, having no influence on the result. The result is now two frequency characteristics, one for the input signal and one for the response signal. The difference between the two frequency characteristics in the Bode diagram yields the desired frequency response of the system. This possibility is likewise described by Unbehauen and Isermann.
With the second possibility, the smoothed impulse response of the system is calculated by deconvoluting the response signal with respect to the input signal. This deconvolution operation depends on the input signal. If the input signal is stepped, the deconvolution operation is identical to a smoothing and subsequent differentiation. The second method thus represents a generalization of the smoothing method as a smoothing deconvolution.
Other features which are considered as characteristic for the invention are set forth in the appended claims.
Although the invention is illustrated and described herein as embodied in a method for generating control parameters from a response signal of a controlled system with a computer and as a system for an adaptive setting of a PID controller with the aid of a neural network, it is nevertheless not intended to be limited to the details shown, since various modifications and structural changes may be made therein without departing from the spirit of the invention and within the scope and range of equivalents of the claims.
The construction and method of operation of the invention, however, together with additional objects and advantages thereof will be best understood from the following description of specific embodiments when read in connection with the accompanying drawings.